/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Thread;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author DELL
 */
public class ThreadCon extends Thread {

    ServerSocket svr;
    int port;

    public ThreadCon(int port) {
        this.port = port;
    }
private ObjectOutputStream out = null;

    @Override
    public void run() {
        try {
            svr = new ServerSocket(port);
            
            while (true) {
                Socket sk = svr.accept();
                

                ThreadSend.listsoc.add(sk);

            }
        } catch (IOException ex) {
        }

    }


    

    /**
     * @return the out
     */
    public ObjectOutputStream getOut() {
        return out;
    }

    /**
     * @param out the out to set
     */
    public void setOut(ObjectOutputStream out) {
        this.out = out;
    }
}
